package com.guodefu.sensitive.handler;

import com.guodefu.sensitive.config.SensitiveStrategy;

public class PhoneSensitiveStrategy implements SensitiveStrategy {
    @Override
    public String mask(String phone, String maskString) {
        if (phone.length() <= 7) {
            return maskString;
        }
        return phone.substring(0, 3) + maskString + phone.substring(phone.length() - 4);
    }
}